package com.zhanggm.s3.house.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.zhanggm.s3.house.entity.House;
import com.zhanggm.s3.house.mapper.HouseMapper;
import com.zhanggm.s3.house.service.IHouseService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zhanggm
 * @since 2023-07-21
 */
@DS("2103a-house")
@Service
public class HouseServiceImpl extends ServiceImpl<HouseMapper, House> implements IHouseService {

    @Override
    public PageInfo<House> pageInfo(House house,Integer pageNum,Integer pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<House> houseList = this.baseMapper.houseList(house);
        return new PageInfo(houseList);
    }
}
